<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: flow::net_flow::Peer_socket::Sent_packet Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceflow.html">flow</a></li><li class="navelem"><a class="el" href="namespaceflow_1_1net__flow.html">net_flow</a></li><li class="navelem"><a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html">Peer_socket</a></li><li class="navelem"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html">Sent_packet</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">flow::net_flow::Peer_socket::Sent_packet Struct Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Metadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission is off) or possibly more (if on) times.  
 <a href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for flow::net_flow::Peer_socket::Sent_packet:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet__inherit__graph.svg" width="363" height="120"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for flow::net_flow::Peer_socket::Sent_packet:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet__coll__graph.svg" width="952" height="348"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html">Sent_when</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data store to keep timing related info when a packet is sent out.  <a href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a7913f73b4e2f164ca51ebb505b63c1f2"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a7913f73b4e2f164ca51ebb505b63c1f2">ack_count_t</a> = uint16_t</td></tr>
<tr class="memdesc:a7913f73b4e2f164ca51ebb505b63c1f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type used for <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#affeb974bc03966744adfcda0366a50aa" title="The number of times any packet with m_sent_when.back().m_order_num &gt; this-&gt;m_sent_when....">m_acks_after_me</a>.  <a href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a7913f73b4e2f164ca51ebb505b63c1f2">More...</a><br /></td></tr>
<tr class="separator:a7913f73b4e2f164ca51ebb505b63c1f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classflow_1_1util_1_1Shared__ptr__alias__holder"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classflow_1_1util_1_1Shared__ptr__alias__holder')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html">flow::util::Shared_ptr_alias_holder&lt; boost::shared_ptr&lt; Peer_socket::Sent_packet &gt; &gt;</a></td></tr>
<tr class="memitem:aa4f1af88393042e60159a3a67f0accbc inherit pub_types_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aa4f1af88393042e60159a3a67f0accbc">Ptr</a> = boost::shared_ptr&lt; Peer_socket::Sent_packet &gt;</td></tr>
<tr class="memdesc:aa4f1af88393042e60159a3a67f0accbc inherit pub_types_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for ref-counted pointer to mutable values of type <code>Target_type::element_type</code> (a-la <code>T*</code>).  <a href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aa4f1af88393042e60159a3a67f0accbc">More...</a><br /></td></tr>
<tr class="separator:aa4f1af88393042e60159a3a67f0accbc inherit pub_types_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef7998db71c60eeb5d1e3d1a97c14886 inherit pub_types_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886">Const_ptr</a> = Const_target_ptr</td></tr>
<tr class="memdesc:aef7998db71c60eeb5d1e3d1a97c14886 inherit pub_types_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for ref-counted pointer to immutable values of type <code>Target_type::element_type</code> (a-la <code>T const *</code>).  <a href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886">More...</a><br /></td></tr>
<tr class="separator:aef7998db71c60eeb5d1e3d1a97c14886 inherit pub_types_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a28eb52fe9520497d02f6c0cd51a5fa9b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a28eb52fe9520497d02f6c0cd51a5fa9b">Sent_packet</a> (<a class="el" href="classbool.html">bool</a> <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html#a89d852e3722532d75006b024714a5cef">rexmit_on</a>, boost::shared_ptr&lt; <a class="el" href="structflow_1_1net__flow_1_1Data__packet.html">Data_packet</a> &gt; packet, const <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html">Sent_when</a> &amp;sent_when)</td></tr>
<tr class="memdesc:a28eb52fe9520497d02f6c0cd51a5fa9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs object with the given values and <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#affeb974bc03966744adfcda0366a50aa" title="The number of times any packet with m_sent_when.back().m_order_num &gt; this-&gt;m_sent_when....">m_acks_after_me</a> at zero.  <a href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a28eb52fe9520497d02f6c0cd51a5fa9b">More...</a><br /></td></tr>
<tr class="separator:a28eb52fe9520497d02f6c0cd51a5fa9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a5b5762a1effba90f631c06ad76f9774b"><td class="memItemLeft" align="right" valign="top">const size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a5b5762a1effba90f631c06ad76f9774b">m_size</a></td></tr>
<tr class="memdesc:a5b5762a1effba90f631c06ad76f9774b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of bytes in the <a class="el" href="structflow_1_1net__flow_1_1Data__packet.html#ad76ae289cd958d62bb5cd29b9f9e894d" title="The payload.">Data_packet::m_data</a> field of the sent packet.  <a href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a5b5762a1effba90f631c06ad76f9774b">More...</a><br /></td></tr>
<tr class="separator:a5b5762a1effba90f631c06ad76f9774b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html">Sent_when</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e">m_sent_when</a></td></tr>
<tr class="memdesc:a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Time stamps, order numbers, and other info at the times when the different attempts (including original sending and retransmissions) to send the packet were given to the UDP net-stack.  <a href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e">More...</a><br /></td></tr>
<tr class="separator:a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affeb974bc03966744adfcda0366a50aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a7913f73b4e2f164ca51ebb505b63c1f2">ack_count_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#affeb974bc03966744adfcda0366a50aa">m_acks_after_me</a></td></tr>
<tr class="memdesc:affeb974bc03966744adfcda0366a50aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of times any packet with <code>m_sent_when.back().m_order_num &gt; this-&gt;m_sent_when.back().m_order_num</code> has been acknowledged.  <a href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#affeb974bc03966744adfcda0366a50aa">More...</a><br /></td></tr>
<tr class="separator:affeb974bc03966744adfcda0366a50aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a704afa0007b8354ad78acad64d029ecf"><td class="memItemLeft" align="right" valign="top">const boost::shared_ptr&lt; <a class="el" href="structflow_1_1net__flow_1_1Data__packet.html">Data_packet</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a704afa0007b8354ad78acad64d029ecf">m_packet</a></td></tr>
<tr class="memdesc:a704afa0007b8354ad78acad64d029ecf"><td class="mdescLeft">&#160;</td><td class="mdescRight">If retransmission is on, this is the DATA packet itself that was sent; otherwise null.  <a href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a704afa0007b8354ad78acad64d029ecf">More...</a><br /></td></tr>
<tr class="separator:a704afa0007b8354ad78acad64d029ecf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html">flow::util::Shared_ptr_alias_holder&lt; boost::shared_ptr&lt; Peer_socket::Sent_packet &gt; &gt;</a></td></tr>
<tr class="memitem:a55a247bb8fb2ec94b7cbfdd56be65a81 inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aa4f1af88393042e60159a3a67f0accbc">Ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#a55a247bb8fb2ec94b7cbfdd56be65a81">ptr_cast</a> (const From_ptr &amp;ptr_to_cast)</td></tr>
<tr class="memdesc:a55a247bb8fb2ec94b7cbfdd56be65a81 inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides syntactic-sugary way to perform a <code>static_pointer_cast&lt;&gt;</code> from a compatible smart pointer type <code>From_ptr</code>, typically <code>From_ptr::element_type</code> being in the same class hierarchy as <code>Target_ptr::element_type</code>.  <a href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#a55a247bb8fb2ec94b7cbfdd56be65a81">More...</a><br /></td></tr>
<tr class="separator:a55a247bb8fb2ec94b7cbfdd56be65a81 inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a520b351b1463e585e278c8c7241b8fc8 inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886">Const_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#a520b351b1463e585e278c8c7241b8fc8">const_ptr_cast</a> (const From_ptr &amp;ptr_to_cast)</td></tr>
<tr class="memdesc:a520b351b1463e585e278c8c7241b8fc8 inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="mdescLeft">&#160;</td><td class="mdescRight">Identical to <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#a55a247bb8fb2ec94b7cbfdd56be65a81" title="Provides syntactic-sugary way to perform a static_pointer_cast&lt;&gt; from a compatible smart pointer type...">ptr_cast()</a> but adds <code>const</code>-ness (immutability) to the pointed-to type.  <a href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#a520b351b1463e585e278c8c7241b8fc8">More...</a><br /></td></tr>
<tr class="separator:a520b351b1463e585e278c8c7241b8fc8 inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac242f13a290877e84e44165e00a5905c inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aa4f1af88393042e60159a3a67f0accbc">Ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#ac242f13a290877e84e44165e00a5905c">dynamic_ptr_cast</a> (const From_ptr &amp;ptr_to_cast)</td></tr>
<tr class="memdesc:ac242f13a290877e84e44165e00a5905c inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#a55a247bb8fb2ec94b7cbfdd56be65a81" title="Provides syntactic-sugary way to perform a static_pointer_cast&lt;&gt; from a compatible smart pointer type...">ptr_cast()</a> but a <code>dynamic_pointer_cast</code> instead of static.  <a href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#ac242f13a290877e84e44165e00a5905c">More...</a><br /></td></tr>
<tr class="separator:ac242f13a290877e84e44165e00a5905c inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a013713e08c6537f91d6bdba29fcccdff inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886">Const_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#a013713e08c6537f91d6bdba29fcccdff">dynamic_const_ptr_cast</a> (const From_ptr &amp;ptr_to_cast)</td></tr>
<tr class="memdesc:a013713e08c6537f91d6bdba29fcccdff inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="mdescLeft">&#160;</td><td class="mdescRight">Identical to <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#a520b351b1463e585e278c8c7241b8fc8" title="Identical to ptr_cast() but adds const-ness (immutability) to the pointed-to type.">const_ptr_cast()</a> but a <code>dynamic_pointer_cast</code> instead of static.  <a href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#a013713e08c6537f91d6bdba29fcccdff">More...</a><br /></td></tr>
<tr class="separator:a013713e08c6537f91d6bdba29fcccdff inherit pub_static_methods_classflow_1_1util_1_1Shared__ptr__alias__holder"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Metadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission is off) or possibly more (if on) times. </p>
<p >This is purely a data store, not a class. It is not copyable, and moving them around by smart <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aa4f1af88393042e60159a3a67f0accbc" title="Short-hand for ref-counted pointer to mutable values of type Target_type::element_type (a-la T*).">Sent_packet::Ptr</a> is encouraged. </p>

<p class="definition">Definition at line <a class="el" href="peer__socket_8hpp_source.html#l02174">2174</a> of file <a class="el" href="peer__socket_8hpp_source.html">peer_socket.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a7913f73b4e2f164ca51ebb505b63c1f2" name="a7913f73b4e2f164ca51ebb505b63c1f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7913f73b4e2f164ca51ebb505b63c1f2">&#9670;&nbsp;</a></span>ack_count_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a7913f73b4e2f164ca51ebb505b63c1f2">flow::net_flow::Peer_socket::Sent_packet::ack_count_t</a> =  uint16_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Type used for <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#affeb974bc03966744adfcda0366a50aa" title="The number of times any packet with m_sent_when.back().m_order_num &gt; this-&gt;m_sent_when....">m_acks_after_me</a>. </p>
<p >Use a small type to save memory; this is easily large enough, given that that we drop a packet after <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#affeb974bc03966744adfcda0366a50aa" title="The number of times any packet with m_sent_when.back().m_order_num &gt; this-&gt;m_sent_when....">m_acks_after_me</a> exceeds a very small value (&lt; 10), and a given ACK can <em>conceivably</em> hold a few thousand individual acknowledgments (most likely many fewer). In fact <code>uint8_t</code> is probably enough, but it seemed easier to not worry about overflows when doing arithmetic with these. </p>

<p class="definition">Definition at line <a class="el" href="peer__socket_8hpp_source.html#l02190">2190</a> of file <a class="el" href="peer__socket_8hpp_source.html">peer_socket.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a28eb52fe9520497d02f6c0cd51a5fa9b" name="a28eb52fe9520497d02f6c0cd51a5fa9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28eb52fe9520497d02f6c0cd51a5fa9b">&#9670;&nbsp;</a></span>Sent_packet()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">flow::net_flow::Peer_socket::Sent_packet::Sent_packet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbool.html">bool</a>&#160;</td>
          <td class="paramname"><em>rexmit_on</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boost::shared_ptr&lt; <a class="el" href="structflow_1_1net__flow_1_1Data__packet.html">Data_packet</a> &gt;&#160;</td>
          <td class="paramname"><em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html">Sent_when</a> &amp;&#160;</td>
          <td class="paramname"><em>sent_when</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs object with the given values and <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#affeb974bc03966744adfcda0366a50aa" title="The number of times any packet with m_sent_when.back().m_order_num &gt; this-&gt;m_sent_when....">m_acks_after_me</a> at zero. </p>
<p >If rexmit-on option enabled, the packet is stored in <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a704afa0007b8354ad78acad64d029ecf" title="If retransmission is on, this is the DATA packet itself that was sent; otherwise null.">m_packet</a>; otherwise <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a704afa0007b8354ad78acad64d029ecf" title="If retransmission is on, this is the DATA packet itself that was sent; otherwise null.">m_packet</a> is initialized to null. Regardless, <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a5b5762a1effba90f631c06ad76f9774b" title="Number of bytes in the Data_packet::m_data field of the sent packet.">m_size</a> is set to <code>packet.m_data.size()</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rexmit_on</td><td>True if and only if <code>sock-&gt;<a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html#a89d852e3722532d75006b024714a5cef" title="Whether retransmission is enabled on this connection.">rexmit_on()</a></code> for the containing socket. </td></tr>
    <tr><td class="paramname">packet</td><td>The packet that will be sent. Used for <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a5b5762a1effba90f631c06ad76f9774b" title="Number of bytes in the Data_packet::m_data field of the sent packet.">m_size</a> and, if <code>sock-&gt;<a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html#a89d852e3722532d75006b024714a5cef" title="Whether retransmission is enabled on this connection.">rexmit_on()</a></code>, saved in <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a704afa0007b8354ad78acad64d029ecf" title="If retransmission is on, this is the DATA packet itself that was sent; otherwise null.">m_packet</a>. </td></tr>
    <tr><td class="paramname">sent_when</td><td><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e" title="Time stamps, order numbers, and other info at the times when the different attempts (including origin...">m_sent_when</a> is set to contain one element equalling this argument. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="peer__socket_8cpp_source.html#l00430">430</a> of file <a class="el" href="peer__socket_8cpp_source.html">peer_socket.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="affeb974bc03966744adfcda0366a50aa" name="affeb974bc03966744adfcda0366a50aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affeb974bc03966744adfcda0366a50aa">&#9670;&nbsp;</a></span>m_acks_after_me</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a7913f73b4e2f164ca51ebb505b63c1f2">ack_count_t</a> flow::net_flow::Peer_socket::Sent_packet::m_acks_after_me</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The number of times any packet with <code>m_sent_when.back().m_order_num &gt; this-&gt;m_sent_when.back().m_order_num</code> has been acknowledged. </p>
<p >Reworded slightly: start at 0; <em>IF</em> a packet, other than this one, is In-flight and then acknowledged, and that packet was sent out (or, equivalently, scheduled to be sent out &ndash; packets do not change order once marked for sending &ndash; a/k/a became In-flight) chronologically AFTER same happened to <code>*this</code> packet <em>THEN</em> add 1. After adding up all such acks, the resulting value = this member.</p>
<p >This is used to determine when <code>*this</code> packet should be considered Dropped, as in TCP's Fast Retransmit heuristic (but better, since time-when-sent &ndash; not sequence number, which has retransmission ambiguities &ndash; is used to order packets).</p>
<p >Note, again, that "after" has little to do with <em>sequence</em> number but rather with send time, as ordered via the <em>order</em> number. E.g., due to retransmission, <code>*this</code> may have sequence number greater than another packet yet have the lesser order number. (This dichotomy is mentioned a lot, everywhere, and if I'm overdoing it, it's only because sometimes TCP cumulative-ack habits die hard, so I have to keep reminding myself.) (If retransmission is disabled, however, then sequence number order = order number order.) </p>

<p class="definition">Definition at line <a class="el" href="peer__socket_8hpp_source.html#l02236">2236</a> of file <a class="el" href="peer__socket_8hpp_source.html">peer_socket.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="peer__socket_8cpp_source.html#l02892">flow::net_flow::Node::categorize_pkts_as_dropped_on_acks()</a>.</p>

</div>
</div>
<a id="a704afa0007b8354ad78acad64d029ecf" name="a704afa0007b8354ad78acad64d029ecf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a704afa0007b8354ad78acad64d029ecf">&#9670;&nbsp;</a></span>m_packet</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const boost::shared_ptr&lt;<a class="el" href="structflow_1_1net__flow_1_1Data__packet.html">Data_packet</a>&gt; flow::net_flow::Peer_socket::Sent_packet::m_packet</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>If retransmission is on, this is the DATA packet itself that was sent; otherwise null. </p>
<p >It is stored in case we need to retransmit it. If we don't (it is acknowledged), the entire <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html" title="Metadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission i...">Sent_packet</a> is erased and goes away, so <a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a704afa0007b8354ad78acad64d029ecf" title="If retransmission is on, this is the DATA packet itself that was sent; otherwise null.">m_packet</a>'s ref-count decreases to zero, and it disappears. If we do, all we need to do to retransmit it is increment its <a class="el" href="structflow_1_1net__flow_1_1Data__packet.html#ac149f87b8915213857c707b0f3562ef0" title="Retransmit counter of the DATA packet being sent.">Data_packet::m_rexmit_id</a> and place it into the retransmission queue for sending, when CWND space is available.</p>
<p >Why store the entire packet and not just its <a class="el" href="structflow_1_1net__flow_1_1Data__packet.html#ad76ae289cd958d62bb5cd29b9f9e894d" title="The payload.">Data_packet::m_data</a>? There's a small bit of memory overhead, but we get <a class="el" href="structflow_1_1net__flow_1_1Data__packet.html#ac149f87b8915213857c707b0f3562ef0" title="Retransmit counter of the DATA packet being sent.">Data_packet::m_rexmit_id</a> for free and don't have to spend time re-creating the packet to retransmit. So it's just convenient.</p>
<p >If retransmission is off, there is no need to store this, as it will not be re-sent. </p>

<p class="definition">Definition at line <a class="el" href="peer__socket_8hpp_source.html#l02251">2251</a> of file <a class="el" href="peer__socket_8hpp_source.html">peer_socket.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="peer__socket_8cpp_source.html#l02501">flow::net_flow::Node::categorize_individual_ack()</a>, <a class="el" href="peer__socket_8cpp_source.html#l03877">flow::net_flow::Node::ok_to_rexmit_or_close()</a>, and <a class="el" href="peer__socket_8cpp_source.html#l03737">flow::net_flow::Node::snd_flying_pkts_erase_one()</a>.</p>

</div>
</div>
<a id="a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e" name="a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e">&#9670;&nbsp;</a></span>m_sent_when</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html">Sent_when</a>&gt; flow::net_flow::Peer_socket::Sent_packet::m_sent_when</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Time stamps, order numbers, and other info at the times when the different attempts (including original sending and retransmissions) to send the packet were given to the UDP net-stack. </p>
<p >These are arranged in the order they were sent (0 = original transmission, 1 = first retransmission, 2 = second retransmission, ...). If retransmission is off, this only ever has 1 element (set via constructor).</p>
<p >Along with each time stamp, we also store an order number. It is much like a sequence number, except (a) we never send it anywhere (internal bookkeeping only), (b) it specifies the order in which the packets were sent off. Why use that and not a <code>m_sent_time</code> timestamp? Because <code>m_sent_time</code> can, in theory, have ties (i.e., it's kind of possible for 2 packets to be sent within the same high-resolution clock tick). This gives us a solid way to order packets by send time in certain key algorithms.</p>
<p >Note: for reasons explained in the pacing module this should be the time stamp when we actually send it off to boost.asio UDP net-stack, not when we queue it into the pacing module (which can be quite a bit earlier, if pacing is enabled). Subtlety: Note that "time stamp when we actually send it off
to boost.asio UDP net-stack" IS the same as "time stamp when boost.asio UDP net-stack actually performs the
`sendto()` call" in practice &ndash; a good thing for accurate RTT measurements. </p>

<p class="definition">Definition at line <a class="el" href="peer__socket_8hpp_source.html#l02217">2217</a> of file <a class="el" href="peer__socket_8hpp_source.html">peer_socket.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="peer__socket_8cpp_source.html#l02501">flow::net_flow::Node::categorize_individual_ack()</a>, <a class="el" href="peer__socket_8cpp_source.html#l02892">flow::net_flow::Node::categorize_pkts_as_dropped_on_acks()</a>, <a class="el" href="low__lvl__io_8cpp_source.html#l00416">flow::net_flow::Node::mark_data_packet_sent()</a>, and <a class="el" href="peer__socket_8cpp_source.html#l03737">flow::net_flow::Node::snd_flying_pkts_erase_one()</a>.</p>

</div>
</div>
<a id="a5b5762a1effba90f631c06ad76f9774b" name="a5b5762a1effba90f631c06ad76f9774b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b5762a1effba90f631c06ad76f9774b">&#9670;&nbsp;</a></span>m_size</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const size_t flow::net_flow::Peer_socket::Sent_packet::m_size</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Number of bytes in the <a class="el" href="structflow_1_1net__flow_1_1Data__packet.html#ad76ae289cd958d62bb5cd29b9f9e894d" title="The payload.">Data_packet::m_data</a> field of the sent packet. </p>

<p class="definition">Definition at line <a class="el" href="peer__socket_8hpp_source.html#l02195">2195</a> of file <a class="el" href="peer__socket_8hpp_source.html">peer_socket.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="peer__socket_8cpp_source.html#l02501">flow::net_flow::Node::categorize_individual_ack()</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>net_flow/<a class="el" href="peer__socket_8hpp_source.html">peer_socket.hpp</a></li>
<li>net_flow/<a class="el" href="peer__socket_8cpp_source.html">peer_socket.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:36 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
